<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	
	<title>Vue组件注册-组件名</title>
</head>
<body>
	<div id="components-demo">
	  <button-counter></button-counter>
	  <button-counter></button-counter>
	  <button-counter></button-counter>
	</div>
</body>
</html>
<script type="text/javascript">
	
	Vue.component('button-counter', {
	  data: function () {
	    return {
	      count: 0
	    }
	  },
	  template: '<button v-on:click="count++">You clicked me {{ count }} times.</button>'
	})

	var app=new Vue({ 
		el: '#components-demo' 
	})
</script>